import _fetch from './request'
function apiGetCity () {
  return _fetch({
    url: '/interview/filters'
  })
}
// 获取模拟面试题详情
function apiGetQueDetail (type, city) {
  return _fetch({
    url: '/interview/questions',
    params: {
      type: type,
      city: city
    },
    needToken: true
  })
}
// 提交答案
function apiSubAnswer ({ id, singleAnswer, multipleAnswer }) {
  return _fetch({
    url: '/questions/submit',
    method: 'POST',
    data: {
      id,
      singleAnswer,
      multipleAnswer
    },
    needToken: true
  })
}
// 获取下一题
function apiGetNext (id) {
  return _fetch({
    url: `/questions/${id}`,
    needToken: true
  })
}
export { apiGetCity, apiGetQueDetail, apiSubAnswer, apiGetNext }
